﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace AllenNeighborhood.UI
{
    public static class Utilities
    {
        public static DateTime? ParseScreenDate(string ScreenField)
        {
            DateTime? result = null;
            if (!string.IsNullOrEmpty(ScreenField))
            {
                DateTime converted;
                DateTime.TryParse(ScreenField, out converted);
                result = converted;
            }
            return result;
        }

        public static int ParseScreenInt(string ScreenField)
        {
            int result = 0;
            if (!string.IsNullOrEmpty(ScreenField))
            {
                int.TryParse(ScreenField, out result);
            }
            return result;
        }
    }
}